#ifndef __OPERATION_DATA_H__
#define __OPERATION_DATA_H__

#include <QSharedData>

struct OperationData : public QSharedData
{
	/// The type of the argument list passed to the Operation call
    typedef QVector<Complex> ArgumentList;
	/// String identifier of the operation, e.g. '+' or 'tanh'.
	QString identifier;
	/// An (optional) help string associated with the operation.
	QString help_string;
	/// Signifies if the operation is functional.
	/// a+b where '+' is the operator is NOT functional, while tanh(a) where
	/// 'tanh' is the operator IS functional, as it is called like a function.
	bool functional;
	/// An arbitrary number specifying the order of operations.
	/// Functional operations should have higher precedence than non-functional
	/// operations.
	uint precedence;
	/// The number of arguments the operation takes.
	/// Negation (-a) would take 1, addition (a+b) would take 2, a functional
	/// operation may take 3 or more (f(a, b, c, ...)).
	/// Functional operations may take a variable number of arguments, in that
	/// case this variable should be set to the VARIABLE_ARG_LIST constant.
	uint num_args;
	/// A pointer to the function that performs the desired operation.
	/// The function takes a QVector of Complexs and returns a Complex.
	Complex (*procedure)(const ArgumentList&);
};

#endif
